<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <input type="" name="" id="" value="" />请输入 -->
	<form action="" method="">
		<input type="" name="" id="" value="" />账号	<br />
		<input type="password" name="" id="" value="" />密码<br />
		<input type="submit" name="" id="" value="提交" />
	</form>
	
	
	
	<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			$('input[type=password]').change(function(){
				// alert('jzsr')
				var value = $('input[type=password]').val()
				// console.log(value);
				if(/^d{4}$/.test(value)){
					alert('yes')
				}else{
					alert('no')
				}
			})
		})
	</script>
</body>
</html>